package net.sk.china.front.service.order;

import com.baomidou.mybatisplus.extension.service.IService;
import net.sk.china.common.model.order.StoreOrderInfo;
import net.sk.china.common.vo.StoreOrderInfoOldVo;

import java.util.List;

/**
 * StoreOrderInfoService 接口
 * +----------------------------------------------------------------------
 * | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2018-2024 聊来All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * +----------------------------------------------------------------------
 * | @Author: 聊来 <18970881148@qq.com>
 * +----------------------------------------------------------------------
 * | DateTime: 2024/6/12 21:27
 * +----------------------------------------------------------------------
 */
public interface StoreOrderInfoService extends IService<StoreOrderInfo> {

    /**
     * 获取订单详情vo列表
     * @param orderId 订单id
     * @return {@code List<StoreOrderInfoOldVo>}
     */
    List<StoreOrderInfoOldVo> getVoListByOrderId(Integer orderId);

    /**
     * 批量添加订单详情
     * @param storeOrderInfos 订单详情集合
     * @return {@code boolean}
     */
    boolean saveOrderInfos(List<StoreOrderInfo> storeOrderInfos);

    /**
     * 获取订单详情-订单编号
     * @param orderNo 订单编号
     * @return {@code List<StoreOrderInfo>}
     */
    List<StoreOrderInfo> getListByOrderNo(String orderNo);

    /**
     * 根据id集合查询数据，返回 map
     * @param orderId 订单ID
     * @return {@code List<StoreOrderInfoOldVo>}
     */
    List<StoreOrderInfoOldVo> getOrderListByOrderId(Integer orderId);

    /**
     * 通过订单编号和规格号查询
     * @param unique 规格号
     * @param orderId 订单编号
     * @return {@code StoreOrderInfo}
     */
    StoreOrderInfo getByUniAndOrderId(String unique, Integer orderId);
}
